const crypto = require('crypto')
const fs = require('fs')
let hash1 = crypto.createHash('sha1')
let s = fs.ReadStream('./app.js')
s.on('data', d => {
  hash1.update(d)
})
s.on('end', () => {
  let d = hash1.digest('hex')
  console.log(d);
})